package view;

import java.awt.Component;
import java.awt.Graphics;

import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * This class is the Panel that renders every panel the user needs to
 * interact with the game (equipment panel, stats panel, skills panel,
 * map panel, pause panel, and inventory panel).
 * 
 * @author Stephanie
 *
 */
public class GamePanel extends JPanel{
	
	public static final String ID = "GAME_PANEL";
		
	public GamePanel( JPanel[] panels ) {
		setLocation(0,0);
		setSize(800,600);
		setVisible(true);
		setLayout(null);
		setDoubleBuffered(true);
		setFocusable(true);
		for ( int i = 0; i < panels.length; i++ ) {
			add(panels[i]);
		}
	}

	protected void paintComponent(Graphics g)
	{
		Component[] components = getComponents();
		for(Component c : components)
		{
			c.repaint();
		}
	}
}
